package com.wysql.thread.zuse;

import java.util.concurrent.ArrayBlockingQueue;

public class Demo {

    public static void main(String[] args) throws InterruptedException {
        ArrayBlockingQueue<String> arrayBlockingQueue = new ArrayBlockingQueue<>(1);

//        arrayBlockingQueue.put("大包子");
//
//        System.err.println(arrayBlockingQueue.take());
//        System.err.println(arrayBlockingQueue.take());
        Foodie foodie = new Foodie(arrayBlockingQueue);
        Cooker cooker = new Cooker(arrayBlockingQueue);

        foodie.start();
        cooker.start();
    }
}
